#ifndef __PORTMANAGER_H__
#define __PORTMANAGER_H__


#include "OSHeaders.h"
#define PAIRPORT_START 30000
#define PAIRPORT_END 60000


class PortManager {
 private:
	UInt32 *m_ports;
	UInt16 m_ppstart,m_ppend;
	UInt16 m_pnums;
	static PortManager *m_inst;
	
 private:
	PortManager();
	void Uninitialize();

 public:
	~PortManager(); 
	
	static PortManager * GetInstance();
	static Bool DelInstance();
	
	Int32 Initialize();

	UInt16 GetPairPort();
	void FreePairPort(UInt16 v_start_port);


	//for test
	void PrintMap();
};

#endif	//__PORTMANAGER_H__
